package com.qn.meta.vo;

import com.qn.meta.entity.User;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;

import java.io.Serializable;
/**
 * qingniu-cloud user source analysis
 *
 * @Author: TXG
 * @Date: 2024/6/11
 * @Version V0.0.2
 */
@Data
@Tag(name="登录返回")
public class UserLoginVo implements Serializable {

    public UserLoginVo(User user)
    {
        setId(user.getId());
        setPhone(user.getPhone());
        setName(user.getName());
        setEmail(user.getEmail());
    }
    @Schema(description = "令牌")
    private String token;

    @Schema(description = "用户ID")
    private Integer id;

    @Schema(description = "用户名")
    private String phone;

    @Schema(description = "昵称")
    private String name;

    @Schema(description = "邮箱")
    private String email;

}
